package input;

import java.io.*;

public class InputDemo6 {
    public static void main(String[] args) throws IOException {
        // 缓冲流结合数组，进行文件拷贝
        // 创建一个字节缓冲输入流
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("F:\\111\\Speed-Hunters.mp4"));
        // 创建一个字节缓冲输出流
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("F:\\111\\copy.mp4"));

        byte[] bytes = new byte[1024];
        int len;

        while ((len = bis.read(bytes)) != -1) {
            bos.write(len);
        }

        bis.close();
        bos.close();
    }
}
